package com.campus.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

@TableName(value = "t_sys_permission", schema = "campus")
public class Permission implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;   // 权限名称

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @TableField(exist = false)
    private List<Role> roles;  // 一个权限可以赋给多个角色

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }



    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }
}
